package com.leaf.lowcode.sdk.video_bussiness;

import com.alibaba.fastjson.JSON;
import com.hikvision.artemis.sdk.ArtemisHttpUtil;
import com.hikvision.artemis.sdk.config.ArtemisConfig;
import com.leaf.lowcode.entity.video_bussiness.SearchRequest;

import java.util.HashMap;
import java.util.Map;


/**
 * Auto Create on 2021-09-09 11:57:58
 */
public class ArtemisPostTest_Resource {
	/**
	 * STEP1：设置平台参数，根据实际情况,设置host appkey appsecret 三个参数.
	 */
	static {
		ArtemisConfig.host = "10.140.161.12:443";
		ArtemisConfig.appKey = "29544061";
		ArtemisConfig.appSecret = "N1Ims5vjYUTQIGdItUjc";
	}
	/**
	 * STEP2：设置OpenAPI接口的上下文
	 */
	private static final String ARTEMIS_PATH = "/artemis";

	//查询监控点列表v2
	public static String search(SearchRequest searchRequest ){
		String searchDataApi = ARTEMIS_PATH +"/api/resource/v1/camera/advance/cameraList";
		Map<String,String> path = new HashMap<String,String>(2){
			{
				put("https://",searchDataApi);
			}
		};
		String body=JSON.toJSONString(searchRequest);
		String result =ArtemisHttpUtil.doPostStringArtemis(path,body,null,null,"application/json");
		return result;
	}
}
